package com.mjh.zhujianju.controller.supervise;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.livew.framework.base.controller.BaseController;
import com.livew.framework.base.service.BaseService;
import com.livew.framework.pojo.AjaxResult;
import com.mjh.zhujianju.model.supervise.SupervisionUsersEO;
import com.mjh.zhujianju.service.supervise.SupervisionUsersService;

@RestController
@RequestMapping("supervise/user")
public class SupervisionUsersController extends BaseController<SupervisionUsersEO>{

	@Resource
	private SupervisionUsersService supervisionUsersService;
	
	@Override
	protected BaseService<SupervisionUsersEO> getService() {
		return supervisionUsersService;
	}


	/**
	 * 根据督办ID查找用户
	 * @param supervisionId
	 * @return
	 */
	@RequestMapping(value="getUsers/{supervisionId}",method=RequestMethod.GET)
	public AjaxResult getUsers(@PathVariable("supervisionId")Long supervisionId){
		List<SupervisionUsersEO> list= supervisionUsersService.getUserListBysupervisionId(supervisionId);
		return AjaxResult.getResult(list);
	}
}
